public class Rectangle {
	private Point p1, p2;
	
	Rectangle(Point p1, Point p2) {
		this.p1 = p1;
		this.p2 = p2;
	}
	
	
	public Double getArea() {
		double x1=p1.x;
		double x2=p2.x;
		double y1=p1.y;
		double y2=p2.y;
		
		double area;
		
		area=Math.abs((x2 - x1) * (y2 - y1));
		
		return area;

	}
	
	public Double getDiagonal() {
		double x1=p1.x;
		double x2=p2.x;
		double y1=p1.y;
		double y2=p2.y;
		
		double diagonl;
				
		diagonl=Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));
					   
		return diagonl;
	}
}
